<?php
/**
 * User: 魔十七
 * Date: 2020/10/30
 * Time: 10:20
 */
namespace Merchant\Controller;

use Think\Controller;
class IndexController extends  JudgeLoginController
{
    public function index(){

        $id = session('merchant.id');
        if ($id == ""){
            $this->error('您还没有登录，请先登录',U("Login/Login"));
        }
        //获取商家信息
        $manager = M('merchant')->where(['id'=>$id])->find();
        $this->assign('manager', $manager);
        //获取商家左侧栏目列表
        $list = getCat(0,2);
        foreach ($list as $key=>$value){
            if($value['is_show'] == 0) unset($list[$key]);
        }
        $this->assign('admin_menu', $list);
        $this->assign('str', "<dl class='layui-nav-child'>");
        $this->display();

    }
}